import { Component, OnInit, Input } from '@angular/core';
import { ArticleItem } from '../../model/articleItem';
import { Router } from '@angular/router'


@Component({
  selector: 'app-article-list',
  templateUrl: './article-list.component.html',
  styleUrls: ['./article-list.component.scss']
})
export class ArticleListComponent implements OnInit {
  //list: ArticleItem[];
  @Input() list: Object[]
  constructor(private router: Router) {

  }

  ngOnInit() {   
  }
  toDetail(id) {
    this.router.navigate(['article', id]);
  }

}
